import { getheadAPI } from '@/api/home.js'
export default {
  namespaced: true,
  state() {
    return {
      list: []
    }
  },
  mutations: {
    setlist(state, payload) {
      state.list = payload
    }
  },
  actions: {
    async getlist(ctx) {
      // 调用接口
      const { result: res } = await getheadAPI()
      console.log(res)
      ctx.commit('setlist', res)
    }
  }
}
